<template>
  <div class="box">
    <v-chart :option="option()" autoresize></v-chart>
  </div>
</template>

<script setup lang="ts">
const props = defineProps(["orderUserTrend", "orderUserTrendAxis"]);
const option = () => {
  return {
    xAxis: {
      show: false,
      type: "category",
      data: props.orderUserTrendAxis,
    },
    yAxis: {
      show: false,
    },
    series: {
      type: "bar",
      data: props.orderUserTrend,
      colorBy: "data",
    },
    grid: {
      left: 0,
      right: 0,
      top: 0,
      bottom: 0,
    },
    tooltip: {
      show: true,
      trigger: "axis",
      confine: true,
      axisPointer: {
        type: "cross",
        label: {
          show: true,
        },
      },
    },
  };
};
</script>

<style scoped>
.box {
  width: 100%;
  height: 100%;
}
</style>
